package util;

import java.sql.*;

public class jdbcmysql {

	  private Connection con = null; //Database objects 

	  
	  public Connection getConnection()
	  {
		   try { 
			     Class.forName("com.mysql.jdbc.Driver"); 

			     con = DriverManager.getConnection( 
			     "jdbc:mysql://140.115.80.86:3306/matchingsystem?useUnicode=true&characterEncoding=Big5", 
			     "admin","1234"); 

			     
			  } 
			   catch(ClassNotFoundException e) 
			   { 
			     System.out.println("DriverClassNotFound :"+e.toString()); 
			   } 
			   catch(SQLException x) { 
			     System.out.println("Exception :"+x.toString()); 
			   }
		    return con;
	  }
	
}
